﻿using System.ComponentModel.DataAnnotations;

namespace star_questionnair.Models;

using System.ComponentModel.DataAnnotations.Schema;
[Table("option")]
public class Option
{

 [Key]
 [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
 public int Id { get; set; }
 
 [Required]
 [StringLength(500, ErrorMessage = "Content length can't exceed 500 characters.")]
 public string Content { get; set; }
 
 [Column("question_id")]      // 显式指定数据库列名为 `question_id`
 public int QuestionId { get; set; }
 [Column("ordination")]
 public int Ordination { get; set; }
}